<cfquery name="qblogbydate" datasource="#request.dsn#">
SELECT * FROM blog_posts JOIN contacts_users ON contacts_users.id = blog_posts.userid
WHERE date(b_postedon) = <cfqueryparam value="#CreateODBCDateTime(showdate)#" cfsqltype="cf_sql_date">
ORDER BY b_postedon DESC
</cfquery>

<cfquery name="qblogcount" datasource="#request.dsn#">
SELECT count(*) AS totalrecords FROM blog_posts
WHERE date(b_postedon) = <cfqueryparam value="#CreateODBCDateTime(showdate)#" cfsqltype="cf_sql_date">
</cfquery>
